﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;

namespace VideoServer.Model
{
    //空对地图像数据包
    [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi, Pack = 1)]
    public struct ReceiveData
    {
        public byte head1;
        public byte head2;
        public UInt16 length;
        public Int16 msgType;
        public byte groupId;
        public byte myId;
        public UInt32 index;
        public byte temperature;
        public Int16 deviceStatus;
        public UInt16 remainMemory;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 39)]
        public byte[] placeHolder1;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2300)]
        public byte[] data;
        public UInt16 ccitt;
        public byte end1;
        public byte end2;
        public Int32 freqOffset;
        [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)]
        public byte[] placeHolder2;
        //字符串，SizeConst为字符串的最大长度
        //[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 256)]
        //public string str;
    }
}
